-- pick_gold
-- create by cheny3
-- 炼金捡金币

return {
    -- 判断
    canTrigger = function(args)
        return true;
    end,

    -- 触发
    trigger = function(args)
        local uiForm = UIMgr.getCurrentScene():getFormByName("UINewWorkshop");
        -- 随机生成5-10个位置
        local num = math.random(5, 10);
        for i = 1, num do
            -- 随机生成一个位置
            local pos = cc.p(math.random(100, 550), math.random(330, 400));
            -- 尝试捡金币
            uiForm:tryPickupGold(pos);
        end
        return true;
    end,
};
